package com.mmc.delay.api;

import com.mmc.delay.bean.JobParam;
import com.mmc.delay.config.TopicConfig;

import java.io.Closeable;

public interface Producer extends Closeable {

    void setTopicConfig(String topic, TopicConfig topicConfig);

    void setTimerIp(String timerIp);

    void setJobHandle(String topic,JobHandle jobHandle);

    /**
     * 异步加入消息
     * @param jobParam
     * @return
     */
    boolean asyncPutMessage(JobParam jobParam);

    /**
     * 同步加入消息
     * @param jobParam
     * @return
     */
    boolean syncPutMessage(JobParam jobParam);
    
}
